<%--
  Created by IntelliJ IDEA.
  User: Ken
  Date: 2022/4/26
  Time: 16:42
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
    <c:if test="${page != null}">
        <!-- 分页导航 -->
        <c:if test="${page.page == 1}">
            <a href="#">首页</a>
            <a href="#">上一页</a>
        </c:if>
        <c:if test="${page.page > 1}">
            <a href="${page.url}&page=1">首页</a>
            <a href="${page.url}&page=${page.page - 1}">上一页</a>
        </c:if>

        <c:if test="${page.page == page.pageCount}">
            <a href="#">下一页</a>
            <a href="#">尾页</a>
        </c:if>
        <c:if test="${page.page < page.pageCount}">
            <a href="${page.url}&page=${page.page + 1}">下一页</a>
            <a href="${page.url}&page=${page.pageCount}">尾页</a>
        </c:if>

        第${page.page}页/共${page.pageCount}页
    </c:if>
</body>
</html>
